package com.xk.ucs.config;

/**
 * 将登陆后的用户信息存全局单例
 * @author jidb
 *
 */
public class GlobalSetting {
	private static GlobalSetting instance = new GlobalSetting();  // 定义一个单例对象（饿汉式）
	private String token;
	private String userNo;
	private volatile int boxNo ;//初始化
	private volatile boolean doLog;

	public static void setInstance(GlobalSetting instance) {
		GlobalSetting.instance = instance;
	}

	public int getBoxNo() {
		return boxNo;
	}

	public void setBoxNo(int boxNo) {
		this.boxNo = boxNo;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public String getUserNo() {
		return userNo;
	}

	public void setUserNo(String userNo) {
		this.userNo = userNo;
	}

	public boolean getDoLog() {
		return doLog;
	}

	public void setDoLog(boolean doLog) {
		this.doLog = doLog;
	}

	//单例对象的构造方法  （构造函数私有，确保每次都只创建一个，避免重复创建。）
	private GlobalSetting() {

	}

     //用来获取唯一的单例对象
     public static GlobalSetting getInstance() {
        return instance;
    }
     
     
}
